<template>
  <div class="main">
    <section>
      <el-table
        :data="list"
        v-loading="listLoading"
        header-row-class-name="table-header"
        element-loading-text="给我一点时间"
        border
        highlight-current-row
      >
        <el-table-column align="center" label="系统参数名" prop="title"></el-table-column>
        <el-table-column align="center" label="修改时间" prop="imageUrl"></el-table-column>
        <el-table-column align="center" label="值" prop="sort"></el-table-column>
        <el-table-column align="center" label="操作" width="120">
          <template slot-scope="scope">
            <el-button type="primary" size="mini" @click="eidtParams(scope.row)">修改</el-button>
          </template>
        </el-table-column>
      </el-table>
    </section>
  </div>
</template>

<script>
import { searchAdList, getPosition } from "@/api/bihuasuan/ad";
export default {
  name: "b-systemset",
  data() {
    return {};
  },
  created() {
    this.getList();
  },
  methods: {
    // 获取列表
    getList() {
      this.listLoading = true;
      searchAdList(this.listQuery)
        .then(res => {
          this.list = res.data.list;
          this.listTotal = res.data.total;
          this.listLoading = false;
          this.list.map(item => {
            item.positionName = this.numToWord(item.position);
            return item.positionName;
          });
        })
        .catch(err => {
          this.list = [];
          this.listTotal = 0;
          this.listLoading = false;
        });
    },
    eidtParams(val) {
        console.log(val)
    }
  }
};
</script>

<style lang="scss">
.ad-manage-list > section {
  padding: 24px;
  background: #fff;
}
</style>
